package com.lee.web.asyncthreadpool.service.impl;

import com.lee.web.asyncthreadpool.service.AsyncDemoService;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author edz
 */
@Service
public class AsyncDemoServiceImpl implements AsyncDemoService {


    @Override
    @Async
    public void asyncDo() {
        System.out.println(Thread.currentThread().getName());
        try {
            Thread.sleep(300000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
